import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:shop/model/MyCountModel.dart';

class SecondHomeScreen extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("SecondHome"),
      ),

      // body: Text("第二页"),

      body: Consumer<MyCountModel>(
          builder: (context, MyCountModel myCountModel, _)=> Center(
            child: Text("${myCountModel.count}"),
          )
      ),

      // floatingActionButton: Consumer<MyCountModel>(
      //   builder: (context, MyCountModel myCountModel, child)=> FloatingActionButton(
      //     onPressed: ()=>myCountModel.increment(),
      //     child: child,
      //   ),
      //   child: Icon(Icons.add),
      // ),
    );
  }
  
}